package com.xhsj.user.hr.process.hrTransferJob.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhsj.user.hr.process.dto.hrTransferJob.MyTransferJobApplyListDto;
import com.xhsj.user.hr.process.dto.hrTransferJob.RunTransferJobApplyListDto;
import com.xhsj.user.hr.process.hrTransferJob.query.CompletedTransferJobApplyQuery;
import com.xhsj.user.hr.process.hrTransferJob.query.MyTransferJobApplyListQuery;
import com.xhsj.user.hr.process.hrTransferJob.query.RunTransferJobApplyListQuery;
import com.xhsj.user.hr.process.hrTransferJob.query.TransferJobApplyBaseDetailedQuery;
import org.apache.ibatis.annotations.Mapper;
import com.xhsj.user.hr.process.hrTransferJob.entity.TbHrApprovalTransferJob;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * <p>
 * hr流程_调岗申请 Mapper 接口
 * </p>
 *
 * @author liuqinghua
 * @since 2020-09-14
 */
@Mapper
public interface TbHrApprovalTransferJobMapper extends BaseMapper<TbHrApprovalTransferJob> {

    /**
     * 我的调职申请列表
     * @author liuqinghua
     * @date Sep 1, 2020 10:07:11 AM
     */
    IPage<MyTransferJobApplyListQuery> myTransferJobApplyList(Page<MyTransferJobApplyListQuery> page,
                                                              @Param("userId") Long userId,
                                                              @Param("data") MyTransferJobApplyListDto data);

    /**
     * 待审核调岗申请列表
     * @author liuqinghua
     * @date Sep 1, 2020 10:07:11 AM
     */
    IPage<RunTransferJobApplyListQuery> runTransferJobApplyList(Page<RunTransferJobApplyListQuery> page,
                                                                @Param("userId") Long userId,
                                                                @Param("roleList") List<Long> roleList,
                                                                @Param("data") RunTransferJobApplyListDto data);

    /**
     * 已审核调岗申请列表
     * @author liuqinghua
     * @date Sep 1, 2020 10:07:11 AM
     */
    IPage<CompletedTransferJobApplyQuery> completedTransferJobApplyList(Page<CompletedTransferJobApplyQuery> page,
                                                                        @Param("userId") Long userId,
                                                                        @Param("data") RunTransferJobApplyListDto data);
    /**
     * 调薪申请基本信息
     * @author liuqinghua
     * @date Sep 1, 2020 10:07:11 AM
     */
    TransferJobApplyBaseDetailedQuery transferJobApplyBaseDetailedList(@Param("dataId") Long dataId);

    /**
     * 调岗申请删除
     * @author liuqinghua
     * @date Sep 1, 2020 10:07:11 AM
     */
    int deleteTransferJobApply(@Param("dataId") Long dataId);
}
